package eventStrategies.physicalModel;

import model.IPhysicalDataModel;
import eventManager.AppEvent;
import eventStrategies.IEventResponse;
import events.ECodeEventList;
import events.physicalModel.SetTemperatureEvent;

public class SetTemperatureStrategy extends IEventResponse {

	private IPhysicalDataModel physModel;
	
	public SetTemperatureStrategy(IPhysicalDataModel physModel) {
		super(ECodeEventList.SET_TEMPERATURE);
		this.physModel = physModel;
	}

	@Override
	public void execute(AppEvent event) {
		SetTemperatureEvent fullEvent = (SetTemperatureEvent) event;
		physModel.setTemperature(fullEvent.temperature);		
	}

}
